import React from "react";
import frame from '../../../style/frame.less';

import store from '../../Redux'
import connect from "react-redux/es/connect/connect";
import * as Actoin from "../../services/action";

class Toperate extends React.Component {

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <div className={frame.tableOperation}>
                <span>记录数：{this.props.pageSize}（每页）/ {this.props.pageTotal}（总计）</span>
                {/*<#--<span style="width: 60px;text-align: center">&nbsp;页码：1&nbsp;/&nbsp;1&nbsp;页</span>-->*/}
                <span className={frame.staticOption}>刷新</span>
                <span className={frame.staticOption}>设置</span>
                <span className={frame.staticOption}>全屏</span>

                {this.props.operation.map((item, index) => {
                    return (
                        <div key={index} className={frame.dynamicOption}>
                            {item.content}
                            {item.dialog}
                        </div>
                    )
                })}
            </div>
        )
    }
}

const mapStateToProps = (store) => {
    return {
        pageSize: store.pageSize,
        pageTotal: store.pageTotal
    }
};

export default connect(mapStateToProps, Actoin)(Toperate)
